package cn.lanca_ip;

import cn.lanca_ip.service.impl.IpPropertiesInterImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class IpSpringBootStartApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(IpSpringBootStartApplication.class, args);
//        IpServiceImpl ipServiceImpl = context.getBean("ipServiceImpl", IpServiceImpl.class);
//        ipServiceImpl.printIp();
        IpPropertiesInterImpl ipTemplate = context.getBean("ipPropertiesInterImpl", IpPropertiesInterImpl.class);
        ipTemplate.printIp();
    }

}
